import Vue from 'vue'
import Router from 'vue-router'

import Parent from '@/components/parent'
import Child1 from '@/components/child1'
import Child2 from '@/components/child2'
import Home from '@/components/home'

Vue.use(Router)

export default new Router({
  routes: [
    { 
      path: '/parent',
      component: Parent,
      children: [
        { 
          path: '',
          component: Home 
        },
        {
          path: 'child1',
          component: Child1
        },
        {
          path: 'child2',
          component: Child2
        }
      ]
    }
  ]
})
